import { MongoClient } from 'mongodb'

import User from './create'

const uri = 'mongodb://admin:dev1024.@localhost:9936/'
const client = new MongoClient(uri)

client.connect().then(() => {
  console.log('数据库连接成功')
  const database = client.db('ts')

  const userModel = new User(database)
  userModel.insertOne('bwf1', 20)
})
